package com.lp.compt.pojo;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "ss_ticket")
public class SsTicketEntity {
    private int tId;
    private int idUser;
    private int idCompettion;
    private Timestamp tStarttime;
    private String tStruts;

    @Id
    @Column(name = "t_id")
    public int gettId() {
        return tId;
    }

    public void settId(int tId) {
        this.tId = tId;
    }

    @Basic
    @Column(name = "id_user")
    public int getIdUser() {
        return idUser;
    }

    public void setIdUser(int idUser) {
        this.idUser = idUser;
    }

    @Basic
    @Column(name = "id_compettion")
    public int getIdCompettion() {
        return idCompettion;
    }

    public void setIdCompettion(int idCompettion) {
        this.idCompettion = idCompettion;
    }

    @Basic
    @Column(name = "t_starttime")
    public Timestamp gettStarttime() {
        return tStarttime;
    }

    public void settStarttime(Timestamp tStarttime) {
        this.tStarttime = tStarttime;
    }

    @Basic
    @Column(name = "t_struts")
    public String gettStruts() {
        return tStruts;
    }

    public void settStruts(String tStruts) {
        this.tStruts = tStruts;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SsTicketEntity that = (SsTicketEntity) o;
        return tId == that.tId && idUser == that.idUser && idCompettion == that.idCompettion && Objects.equals(tStarttime, that.tStarttime) && Objects.equals(tStruts, that.tStruts);
    }

    @Override
    public int hashCode() {
        return Objects.hash(tId, idUser, idCompettion, tStarttime, tStruts);
    }
}
